const express = require('express');
const Task = require('../model/task');
const todo = express.Router();

todo.get('/task',async (req,res)=>{
    const tasks = await Task.find();
    setTimeout(()=>{
        res.send(tasks);
    },2000)
});


module.exports = todo;
